#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    double x1, y1, x2, y2;
    cin >> x1 >> y1;
    double d = 0;
    while (cin >> x1 >> y1 >> x2 >> y2)
    {
        double dx = x2 - x1;
        double dy = y2 - y1;
        d += sqrt(dx * dx + dy * dy) * 2;
    }
    int minute = round(d / 1000 / 20 * 60);
    int hour = minute / 60;
    minute %= 60;
    printf("%d:%02d\n", hour, minute);
    return 0;
}